package com.zd.springcloud.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyGlobalExceptionHandler {

    @ExceptionHandler(RuntimeException.class)
    public String handler(){

        System.out.println("=============系统出现了异常==============");
        return "xxxx";
    }
}
